home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / dlibsrc.arc / STRISTR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-05  |  267 b   |  17 lines

  1. #include <stddef.h>
  2.  
  3. char *stristr(string, pattern)
  4.     register char *string, *pattern;
  5.     {
  6.     register int plen;
  7.  
  8.     plen = strlen(pattern);
  9.     while(*string)
  10.         {
  11.         if(strnicmp(string, pattern, plen) == 0)
  12.             return(string);
  13.         ++string;
  14.         }
  15.     return(NULL);
  16.     }
  17.